package ai.peanut.selfbase.modules.user.dao;


import ai.peanut.selfbase.modules.user.entity.User;
import ai.peanut.selfbase.modules.user.pojo.UserDto;
import ai.peanut.selfbase.modules.user.pojo.UserParam;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author lichong
 * @since 2019-02-15
 */
public interface UserMapper extends BaseMapper<User> {
    /**
     * 获取列表
     * @param page
     * @param params
     * @return
     */
    List<UserDto> selectAllByParams(Page page , UserParam params ) ;

    /**
     * 批量删除
     * @param params
     * @return
     */
    int deleteByIds( UserParam params) ;

    UserDto getUserByLoginName(@Param("loginName") String loginName) ;
}

